package com.xinyun.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * Created by bubusy on 16/5/21.
 */
public class ServerInitializer extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        socketChannel.pipeline().addLast(new ProtocolDecoder());
        socketChannel.pipeline().addLast(new ProtocolEncoder());
        socketChannel.pipeline().addLast(new ProtocolHandler());
    }
}
